<template>
  <div class="x-home">
    <div class="x-post">
      <x-post v-for="blog in blogs" :blog="blog"></x-post>
    </div>
  </div>
</template>

<script setup>
import { ref } from "vue";
import { listBlogs } from "@/api/testApi.js";
import xPost from "@/components/x-post.vue";

const blogs = ref([
  {
    id: 1,
    title: "测试标题",
    desc: "测试描述",
  },
]);
listBlogs(0).then((data) => {
  console.log(data);
});
</script>

<style scoped>
.x-home {
  display: flex;
  width: 100%;
  height: 100%;
  justify-content: center;
}
</style>
